﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OracleClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Windows.Forms;
using BLL;
using Util;
using Model;


namespace happyMusic
{
    public partial class test1: System.Web.UI.Page
    {
        CheckNull ck = new CheckNull();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            int count = -1;
            UserService userService = new UserService();
            User user = new User();
            user.UserNo = TextBox1.Text.ToString().Trim();
            user.UserName = TextBox2.Text.ToString().Trim();
            /**
            * 1.ExecuteNonQuery方式新增、修改、删除              
            */
            //count = userService.InsertUser(user);   //新增
            //count = userService.UpdateUserByUserNo(user);  //修改
            count = userService.DeleteUserByUserNo(user);   //删除
            if (count > 0) {
                MessageBox.Show(count.ToString());
            }

        }
    }
}